package xcmg.device.web.prepPay;

import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import xcmg.device.infra.BasicController;
import xcmg.device.service.prepPay.PrepPayDetailService;
import xcmg.device.service.vo.prepPay.PrepPayQueryVO;
import yb.ecp.fast.infra.annotation.FastMappingInfo;

import java.util.Arrays;

/**
 * @author: xiali@bkrwin.com
 * @description:
 * @date： 2019/6/12 15:09
 **/
@RestController
@RequestMapping("/prepPayDetail")
public class PrepPayDetailController extends BasicController {
    @Autowired
    PrepPayDetailService prepPayDetailService;

    @RequestMapping(value = "/export",method = RequestMethod.POST)
    @FastMappingInfo(needLogin = true)
    public void export( String[] ids)throws Exception {
        prepPayDetailService.export(Arrays.asList(ids));
    }

    @RequestMapping(value = "/exportAll",method = RequestMethod.POST)
    @FastMappingInfo(needLogin = true)
    public void exportAll(PrepPayQueryVO condition)throws Exception {
        condition.setOrgId(getOrgId());
        prepPayDetailService.exportAll(condition);
    }
}
